<?php

namespace app\common\validate;
use think\Validate;
class Admin extends Validate
{
    protected $rule =   [
        'admin_username'  => 'require|max:25',
        'admin_pwd'   => 'require',
    ];
    protected $message  =   [
        'admin_username.require' => '用户名称不能为空',
        'admin_username.max'     => '用户名称最多不能超过25个字符',
        'admin_pwd.reauire'   => '密码不能为空',
    ];
    protected $scene = [
        'login'  =>  ['admin_username','admin_pwd'],
    ];
}